<?php

if (!defined('BASEPATH'))
    exit('No direct script access allowed');

class Login extends CI_Controller {

    public function __construct() {
        parent::__construct();
        $this->load->helper('url');
        $this->load->helper('file');
        $this->load->helper('fuc');
        $this->load->library('session_db');
        $this->load->library('topclass');
        $this->load->library('taobao_url_process');
        $this->load->database();
        $this->config->load('topapiconfig');
        $this->config->load('sysetting');
        $this->load->model('cats_product');
        $this->load->model('url_topke');
        $this->load->model('users');
        $this->load->model('oauth_login');
    }

    public function index() {               
        $this->load->view('front/login');
    }

    public function actlogin() {
        $code = $_REQUEST['code'];   //通过访问https://oauth.taobao.com/authorize获取code
        $res = $this->oauth_login->action_lognin($code);
       // print_r($res);
        $this->oauth_login->db_session($res);
        $this->oauth_login->db_user();
        exit;
    }

}

/* End of file welcome.php */
/* Location: ./application/controllers/welcome.php */